#include <stdio.h>
int main(void){
	int m,i;
	printf("plz enter the initial number:\n");
	scanf("%d",&m);
	for(i=m;i<=100+m;i++){
		if(i%3!=0 && i%7==0){
			printf("%d\n",i);
		}
	}
	return 0;
} 
